namespace BootstrapBlazorApp.Server.Pojo;

using System.ComponentModel.DataAnnotations;

public class RegisterVo
{
    [Required(ErrorMessage = "用户名不可为空")]
    public string? UserName { get; set; }
    
    
    [Required(ErrorMessage = "密码不可为空")]
    [RegularExpression("""
                       ^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,24}$

                       """, ErrorMessage = "密码必须包含数字和字母，长度6-24位")]
    public string? Password { get; set; }
    
    [Required(ErrorMessage = "确认密码不可为空")]
    [Compare("Password", ErrorMessage = "密码与确认密码不匹配")]
    public string? ConfirmPassword { get; set; } 
    
}
